Skip to content

Add available devices and dtypes selection to runner.py #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

dmitrii-kriukov
Copy link
Contributor

Add parameters to runner.py that define devices and data types available to run
Unselected devices and data types will be ignored in configs

for example if config contains
device: ["host", "gpu", "cpu"]
and you run
python runner.py --devices cpu gpu
cpu and gpu cases will be launched,
but if config contains:
device: ["host", "gpu"]
and you run
python runner.py --devices cpu gpu
only gpu case will be launched

default values ​​do not limit the available devices and data types

Comment on lines +56 to +57
parser.add_argument('--dtype', '--dtypes', type=str, default="float32 float64", nargs='+',
choices=("float32", "float64"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of PR scope, but int32 might be added

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to add this kind of changes in other PR

Comment on lines +109 to +110
logging.info('The device parameter value is not defined in config, '
'none is used')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move up from if because --device might be added later for xgboost, for example.

Copy link
Contributor Author

@dmitrii-kriukov dmitrii-kriukov Dec 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now other configs do not support device parameter and such message may be confusing

@napetrov napetrov merged commit 6891388 into IntelPython:master Dec 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants